<script setup>
    import { ref,watch } from 'vue';
    const uname = ref('')
    watch(uname,(newVal,oldVal) => {
        console.log('newVal: ' + newVal);
        console.log('oldVal' + oldVal);
        
    })
</script>
    
<template>
    <input type="text" name="" id="" v-model="uname">
</template>
    
<style>
    
</style>